From: Jo-Philipp Wich Date: Tue, 27 Sep 2022 20:33:04 +0000 (+0200) Subject: luci-base: sys.uc: reliably skip TIME_WAIT connections in conntrack list X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=21dacf2db7899b1e90cb6d4fe6595f1991ba3635;p=project%2Fluci.git luci-base: sys.uc: reliably skip TIME_WAIT connections in conntrack list The TIME_WAIT indicator might not appear at the beginning of the tuple string in some cases, so match it anywhere. Signed-off-by: Kevin Darbyshire-Bryant [add commit message] Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/ucode/sys.uc b/modules/luci-base/ucode/sys.uc index 33a7ac7d76..305499c797 100644 --- a/modules/luci-base/ucode/sys.uc +++ b/modules/luci-base/ucode/sys.uc @@ -67,7 +67,7 @@ export function conntrack_list(callback) { tuples = m[2]; } - if (index(tuples, 'TIME_WAIT ') === 0) + if (index(tuples, 'TIME_WAIT') !== -1) continue; let e = {